<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../layui/css/eleTree.css" media="all">
    <style>

</style>
</head>
<body>
    <button id="parentIframe" class="layui-btn">dsadasdasdas</button>
    <div class="eleTree ele1" lay-filter="data1"></div>
    <button class="layui-btn">获取选中数据</button>
    <!-- 选择菜单 -->
<div id="menuLayer" style="display: none;padding:10px;">
    <ul id="menuTree" class="ztree">asffffffffffff</ul>
</div>
    <script src="../layui/layui.js"></script>
    <script>
        layui.config({
            base: "../layui/lay/mymodules/"
        }).use(['jquery','eleTree'], function(){
         var  $ = layui.jquery;
         var  eleTree = layui.eleTree;
           $('#parentIframe').on('click', function(){
  //           layer.open({
  //             type: 2,
  //             title: '选择上级',
  //             maxmin: true,
  //     shadeClose: true, //点击遮罩关闭层
  //     area : ['300px' , '400px'],
  //     content: 'in.html',

  // });



  layer.open({
                type: 1,
                offset: '50px',
                skin: 'layui-layer-molv',
                title: "选择菜单",
                area: ['300px', '450px'],
                shade: 0,
                shadeClose: false,
                content: $("#menuLayer"),
                btn: ['确定', '取消'],
                btn1: function (index) {
                    // var node = ztree.getSelectedNodes();
                    // //选择上级菜单
                    // vm.menu.parentId = node[0].menuId;
                    // vm.menu.parentName = node[0].name;

                    layer.close(index);
                }
            });
        });

       });


   </script>

</body>
</html>